Skip to main content

Animator

declare abstract class Animator {}

Animator

Instance Method

constructor

declare class Animator {
constructor(context: Context)
}
  • Description

    Create a new Animator.

start

declare class Animator {
start(): void
}
  • Description

    Starts this animation.

end

declare class Animator {
end(): void
}
  • Description

    Ends the animation.

cancel

declare class Animator {
cancel(): void
}
  • Description

    Cancels the animation.

setStartDelay

declare class Animator {
setStartDelay(startDelay: number): void
}
  • Description

    The amount of time, in milliseconds, to delay processing the animation after start() is called.

setDuration

declare class Animator {
setDuration(duration: number): Animator
}
  • Description

    Sets the duration of the animation.

getDuration

declare class Animator {
getDuration(): number
}
  • Description

    Gets the duration of the animation.

getStartDelay

declare class Animator {
getStartDelay(): number
}
  • Description

    The amount of time, in milliseconds, to delay processing the animation after start() is called.

setInterpolator

declare class Animator {
setInterpolator(value: TimeInterpolator): void
}
  • Description

    The time interpolator used in calculating the elapsed fraction of the animation.

isRunning

declare class Animator {
isRunning(): boolean
}
  • Description

    Returns whether this Animator is currently running (having been started and gone past any initial startDelay period and not yet ended).

addListener

declare class Animator {
addListener(listener: Animator.AnimatorListener): void
}
  • Description

    Adds a listener to the set of listeners that are sent events through the life of an animation, such as start, repeat, and end.

removeListener

declare class Animator {
removeListener(listener: Animator.AnimatorListener): void
}
  • Description

    Removes a listener from the set listening to this animation.

removeAllListeners

declare class Animator {
removeAllListeners(): void
}
  • Description

    Removes all listeners and pauseListeners from this object.

getListeners

declare class Animator {
getListeners(): ArrayList<Animator.AnimatorListener>
}
  • Description

    Gets the set of Animator.AnimatorListener objects that are currently listening for events on this Animator object.

clone

declare class Animator {
clone(): Animator
}
  • Description

    Creates and returns a copy of this object.

setTarget

declare class Animator {
setTarget(target: Object): void
}
  • Description

    Sets the target object whose property will be animated by this animation.

setupEndValues

declare class Animator {
setupEndValues(): void
}
  • Description

    This method tells the object to use appropriate information to extract ending values for the animation.

setupEndValues

declare class Animator {
setupStartValues(): void
}
  • Description

    This method tells the object to use appropriate information to extract starting values for the animation.

Animator.AnimatorListener

AnimatorListener

declare interface AnimatorListener {
onAnimationStart(animation: Animator): void;

onAnimationEnd(animation: Animator): void;

onAnimationCancel(animation: Animator): void;

onAnimationRepeat(animation: Animator): void;
}

Instance Method

onAnimationStart

declare class Animator {
onAnimationStart(animation: Animator): void;
}
  • Description

    Notifies the start of the animation.

onAnimationEnd

declare class Animator {
onAnimationEnd(animation: Animator): void;
}
  • Description

    Notifies the end of the animation.

onAnimationCancel

declare class Animator {
onAnimationCancel(animation: Animator): void;
}
  • Description

    Notifies the cancellation of the animation.

onAnimationRepeat

declare class Animator {
onAnimationRepeat(animation: Animator): void;
}
  • Description

    Notifies the repetition of the animation.